package com.heima.schedule.controller;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.schedule.dtos.Task;
import com.heima.schedule.service.ITaskService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class TaskConstroller {

    @Resource
    private ITaskService iTaskService;

    @PostMapping("/task/auto")
    public ResponseResult autoTask(@RequestBody Task task){
        return ResponseResult.okResult(iTaskService.TaskAdd(task));
    }
}
